package service;


import service.PortingResult;
import java.io.Serializable;
import java.util.Vector;
import javax.jws.WebParam;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

@XmlAccessorType(XmlAccessType.FIELD)
// @XmlRootElement(name="##default")
// stef: warum nicht @XmlRootElement(name = "customer") ?? ich probiers mal...
@XmlRootElement
public class Customer implements Serializable{
    @XmlAttribute
    private String id;
    private String name = "";
    private long provider = 0;
    private Vector<PortingResult> portingResults = new Vector<PortingResult>();


    public Customer(){

    }
    public Customer(@WebParam(name="id") String id, @WebParam(name="name")String name){
        this.setId(id);
        this.setName(name);
    }


    public String getId() {
        return id;
    }

    public void setId(@WebParam(name="id") String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(@WebParam(name="name") String name) {
        this.name = name;
    }

    public long getProvider() {
        return provider;
    }

    public void setProvider(@WebParam(name="provicer")long provider) {
        this.provider = provider;
    }
    public Vector<PortingResult> getPortingResults()
    {
        return this.portingResults;
    }
    public String toString(){
        return "Name: "+this.name+"\n"+
                "ID: "+this.id+"\n"+
                "Provider: "+this.provider+"\n";
    }

}
